var Workport = Workport || {};

Workport.DocumentDomain = {
	SelfRequest : function(){
		this.pageSize;	//optional default is 10,Number of records to be displayed
		this.offset;	//optional,Date for pagination
		this.order;		//Mandatory,Ascending(true)/Descending (false)
		this.filter;	//Optional Default - (Time),name/Time
		this.key;		//key for A-z
	},
	SelfResponse : function(){
		this.code;
		this.message;
		this.files = [
		     function(){
		    	 this.fileName;
		    	 this.fileType;
		    	 this.notificationId;
		    	 this.communityId;
		    	 this.documentId;
		    	 this.attachmentUrl;
		    	 this.createdDate;
		    	 this.lastModifiedDate;
		    	 this.modifiedBy;
		    	 this.createdBy;
		    	 this.serverDate;
		    	 this.notificationType;
		     }
		];
	},
	AllDocumentRequest : function(){
		this.pageSize;	//optional default - 10
		this.sinceid;	//optional Default - 0
		this.order;		//Mandatory,order=true/false {true-Descending/false-Ascending}
		this.filter;	//Optional Default - (Time),NAME/TIME{NAME-Document name/TIME-Document modified time}
		this.key		//optional,community search key{optional}
	},
	AllDocumentResponse : function(){
		this.code;
		this.message;
		this.documents = [
		     function(){
		    	 this.communityId;
		    	 this.communityName;
		    	 this.communityImageUrl;
		    	 this.totalFileCount;
		    	 this.rowN;
		    	 this.serverDate;
		    	 this.details = [
		    	      function(){
		    	    	  this.fileName;
		 		    	 this.fileType;
		 		    	 this.notificationId;
		 		    	 this.communityId;
		 		    	 this.documentId;
		 		    	 this.attachmentUrl;
		 		    	 this.createdDate;
		 		    	 this.lastModifiedDate;
		 		    	 this.modifiedBy;
		 		    	 this.createdBy;
		 		    	 this.serverDate;
		 		    	 this.notificationType;
		    	      }
		    	 ];
		     }
		];
	},
	DocumentDetailRequest : function(){
		this.documentId;
		this.type;			//Type of the notification [U/C]
		this.targetId;
	},
	DocumentDetailResponse : function(){
		this.code;
		this.message;
		this.documents = [
		     function(){
		    	 this.fileName;
		    	 this.fileType;
		    	 this.createdDate;
		    	 this.modifiedBy;
		    	 this.createdBy;
		    	 this.notificationType;
		    	 this.attachmentUrl;
		    	 this.tags;
		    	 this.remarks;
		    	 this.Description;
		    	 this.enableCheckin;
		    	 this.enableCheckout;
		    	 this.currentVersion;
		    	 this.lastModifiedDate;
		    	 this.serverDate;
		     }
		];
	},
	SearchRequest : function(){
		this.pageSize;	//Optional default : 10,PageSize
		this.key;
		this.offset;
		this.entity;	//Entity Type:U/C
	},
	SearchResponse : function(){
		this.code;
		this.message;
		this.details = [
		     function(){
		    	 this.fileName;
		    	 this.fileType;
		    	 this.createdDate;
		    	 this.createdBy;
		    	 this.modifiedBy;
		    	 this.notificationType;
		    	 this.attachmentUrl;
		    	 this.documentId;
		    	 this.notificationId;
		    	 this.communityID;
		    	 this.lastModifiedDate;
		    	 this.serverDate;
		    	 this.key;
		     }
		];
	},
	CommunityDocumentRequest : function(){
		this.pageSize;		// optional, default 10,
		this.offset;		// optional, Last fetched date
		this.communityId;
		this.filter;		// NAME/TIME
		this.order;			// true-Ascending/false-Descending
	},
	CommunityDocumentResponse : function(){
		this.code;
		this.message;
		this.files = [
		     function(){
		    	 this.fileName;
		    	 this.fileType;
		    	 this.notificationId;
		    	 this.communityId;
		    	 this.documentId;
		    	 this.attachmentUrl;
		    	 this.createdDate;
		    	 this.lastModifiedDate;
		    	 this.modifiedBy;
		    	 this.createdBy;
		    	 this.serverDate;
		    	 this.notificationType;
		     }
		];
	},
	CheckinRequest : function(){
		this.notificationId;		//Mandatory
		this.notificationType;		//Mandatory
		this.documentId;			//Mandatory
		this.targetId;				//Mandatory,(CommunityId|UserId)
		this.version;				//Mandatory
		this.comments;				//Optional
		this.documentContent;		//Mandatory
	},
	CheckinResponse : function(){
		this.code;
		this.message;
	},
	CheckoutRequest : function(){
		this.notificationId;	//Mandatory
		this.notificationType;	//Mandatory
		this.documentId;		//Mandatory
		this.targetId;			//Mandatory,(CommunityId|UserId)
	},
	CheckoutResponse : function(){
		this.code;
		this.message;
	},
	DiscardRequest : function(){
		this.notificationId;	//Mandatory
		this.notificationType;	//Mandatory
		this.documentId;		//Mandatory
		this.targetId;			//Mandatory,(CommunityId|UserId)
	},
	DiscardResponse : function(){
		this.code;
		this.message;
	},
	VersionRequest : function(){
		this.documentId;	//mandatory
		this.type;			//mandatory,Type of the notification [U/C]
		this.targetId;		//mandatory,CommunityId | UserId
	},
	VersionResponse : function(){
		this.code;
		this.message;
		this.versions = [
		     function(){
		    	 this.version;
		    	 this.modifiedDate;
		    	 this.modifiedBy;
		    	 this.remarks;
		    	 this.documentUrl;
		     }
		];
	},
	CopyRequest : function(){
		this.targetId;			//Mandatory
		this.tags;				//Optional
		this.entityId;
		this.entityType;
		this.communityId;
		this.attachmentName;	//Optional
		this.attachmentType;	//Optional
		this.attachmentContent;	//Optional
	},
	CopyToRequest : function(){
		this.src;				//Mandatory
		this.dest;				//Mandatory
		this.documentId;		//Mandatory
		this.type;				//Mandatory
	},
	CopyResponse : function(){
		this.code;
		this.message;
	},
	RestoreRequest : function(){
		this.documentId;	//mandatory
		this.version;		//mandatory
		this.type;		//mandatory,C - Community | U - user
		this.targetId;	//mandatory,CommunityId | UserId
	},
	RestoreResponse : function(){
		this.code;
		this.message;
	}
}